package day16;

public class Homework {
    public static void main(String[] args) {
        Mysql sql=Mysql.get();
        System.out.println("这是唯一的数据库连接池！"+sql);
    }
}

class  Mysql{
    private static Mysql sql;
    private Mysql(){}
    public static synchronized Mysql get(){
        if (sql==null){
            sql=new Mysql();
        }
        return sql;
    }
}